﻿<?php defined('_JEXEC') or die('Restricted access'); ?>

<?php JHTML::_('behavior.tooltip'); ?>

<?php
	$cid = JRequest::getVar( 'cid', array(0) );
	$edit = JRequest::getVar('edit',true);
	$text = intval($edit) ? JText::_( 'Edit' ) : JText::_( 'New' );

	JToolBarHelper::title( 'maszyny_sj' . ': <small><small>[ '. $text .' ]</small></small>' , 'maszyny_sj.png' );
	JToolBarHelper::save();
	JToolBarHelper::cancel();
	JToolBarHelper::help( 'screen.maszyny_sj.edit' );
?>

<?php
	// clean item data
	JFilterOutput::objectHTMLSafe( $this->maszyny_sj, ENT_QUOTES, '' );
?>
<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) 
	{
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}

		// do field validation
		if (trim(form.name.value) == "") {
			alert( "Podaj nazwę maszyny_sja!" );
		} else {
			submitform( pressbutton );
		}
	}
</script>

<form action="index.php" method="post" name="adminForm" autocomplete="off">
	<div class="col">
		<fieldset class="adminform">
		<legend><?php echo 'Szczegóły maszyny_sja'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="name">
							<?php echo 'Nazwa maszyny_sja'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="name" id="name" class="inputbox" size="150" maxlength="150" value="<?php echo $this->maszyny_sj->get('name'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
	</div>
	<div class="clr"></div>

	<input type="hidden" name="id" value="<?php echo $this->maszyny_sj->get('id'); ?>" />
	<input type="hidden" name="cid[]" value="<?php echo $this->maszyny_sj->get('id'); ?>" />
	<input type="hidden" name="option" value="com_maszyny_sj" />
	<input type="hidden" name="task" value="" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
